package com.nuaa.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.nuaa.dao.base.impl.BaseDaoImpl;
import com.nuaa.dao.inter.AdminDaoInter;
import com.nuaa.domain.user.admin.AdminInfo;

@Repository("adminDao")
public class AdminDaoImpl extends BaseDaoImpl<AdminInfo, Integer> implements AdminDaoInter {

	@Override
	public List<AdminInfo> getAdminInfo(String login_name, String login_password) {
		String sql = String.format("select * from admin_info where login_name = '%s' and login_password = '%s'",
				login_name, login_password);
//		System.out.println(sql);
		return this.search(AdminInfo.class, sql);

	}
	
	public void updateAdminInfo(AdminInfo adminInfo){
		this.update(adminInfo);
	}

}
